main() {
  print("==========variables.dart============");
  {
    var name = 'Bob';
    print(name);
    dynamic name1 = 'Bob';
    print(name1);
    String name2 = 'Bob';
    print(name2);
    int lineCount = 1;
    print(lineCount);
    // ignore: unnecessary_null_comparison
    print(lineCount == null);
  }

  //Final and const
  {
    final name = 'Bob'; // Without a type annotation
    final String nickname = 'Bobby';
    print(name);
    print(nickname);
  }

  {
    const bar = 1000000; // Unit of pressure (dynes/cm2)
    const double atm = 1.01325 * bar; // Standard atmosphere
    print(bar);
    print(atm);
  }

  {
    var foo = const [];
    final bar = const [];
    print(foo); //[]
    //const baz = []; // Equivalent to `const []`
  }

  {
    // Valid compile-time constants as of Dart 2.5.
    const Object i = 3; // Where i is a const Object with an int.dart value...
    const list = [i as int]; // Use a typecast.
    const map = {if (i is int) i: "int.dart"}; // Use is and collection if.
    const set = {if (list is List<int>) ...list}; // ...and a spread.
    print(list); //[3]
    print(map); //{3: int.dart}
    print(set); //{3}
  }
}
